<template>
  <div>
    <Tabs v-model="name" @on-click="changeTab">
      <TabPane label="渠道负责人" name="head">
        <channelHead ref="head" />
      </TabPane>
      <TabPane label="配置列表" name="list">
        <configList ref="list" />
      </TabPane>
    </Tabs>
  </div>
</template>
<script>
import channelHead from "./channelhead";
import configList from "./configlist";
export default {
  name: "toConfigure",
  components: { channelHead, configList },
  data() {
    return {
      name: "head",
    };
  },
  mounted() {
    this.changeTab();
  },
  methods: {
    changeTab() {
      switch (this.name) {
        case "head":
          this.$refs.head.initial();
          break;
        case "list":
          this.$refs.list.initial();
          break;
      }
    },
  },
};
</script>
